<html>
<head><meta charset="utf-8"><title>public/private · t-cargo/PubGrub · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/index.html">t-cargo/PubGrub</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/public.2Fprivate.html">public/private</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248323433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/public/private/near/248323433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/public.2Fprivate.html#248323433">(Aug 04 2021 at 08:34)</a>:</h4>
<p>By the way, I just had a look at the issue for tracking public/private. What is the core idea/problem with "scoped goals" and "public dependencies"? (I know nothing about the RFC)</p>



<a name="248329948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/public/private/near/248329948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/public.2Fprivate.html#248329948">(Aug 04 2021 at 09:53)</a>:</h4>
<p>I just read the public/private RFC. So if I understand well, there are two goals:</p>
<ol>
<li>catch shared usage of a type at different versions at dependency resolution instead of at compilation</li>
<li>possibly enable more situations for private dependencies (they can basically be any version they want)</li>
</ol>
<p>(1) would require a constraint preventing from having two different versions of a crate connected via a chain of public edges (dependencies) in the dependency graph. One remark I have about this RFC is that it will also result in false positives. It could prevent a crate from compiling because in theory two versions of a public dependency are available, but in practice they are not used together.</p>
<p>(2) I suppose this could even enable situations where we have "a" at version 1.1 and 1.2 in the solution if they are both private dependencies? or is that stretching the concept of private too far? because how does that play with a public "p" within the private "a". I'm not sure I've read in the RFC what is the situations for public deps of private deps.</p>



<a name="248354974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/public/private/near/248354974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/public.2Fprivate.html#248354974">(Aug 04 2021 at 14:11)</a>:</h4>
<p>That all sounds right. Your point about false positives is entirely correct. That is one of the reasons the RFC cannot be implemented as described. It will need some syntax in Cargo.toml for "I don't care about this conflict".</p>



<a name="248355702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/public/private/near/248355702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/public.2Fprivate.html#248355702">(Aug 04 2021 at 14:16)</a>:</h4>
<blockquote>
<p>have "a" at version 1.1 and 1.2 in the solution</p>
</blockquote>
<p>That is going further then the RFC does. (Some think it is a better design, but it would be to big a braking change.)<br>
The RFC only adds new conflicts/incompatibilities, it does not relax any existing conflicts/incompatibilities.<br>
If the pre-RFC resolver thinks there are no solutions, then there are no solutions with the post-RFC resolver.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>